package com.itheima.dao;

import com.itheima.pojo.Personnel;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PersonnelDetailsDao {
    public List<Personnel> selectByCondition(String queryString);

    @Insert("insert into t_enterprise_personnel values(null,#{companyName},#{sex},#{age},#{idCard},#{origo},#{currentAddr},#{ning},#{contactWh},#{contactWz},#{currentStatus},#{teardownTime},#{phoneNumber},#{responsible},#{name})")
    public void add(Personnel personnel);

    @Select("select * from t_enterprise_personnel where id =#{id}")
    Personnel findById(Integer id);

    @Delete("delete from t_enterprise_personnel where id = #{id}")
    void delete(Integer id);

    void edit(Personnel personnel);
}
